package com.dxy.serviceImpI;

import com.dxy.bean.MenoBean;
import com.dxy.mapper.MenoMapper;
import com.dxy.service.MenoService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class MenoServiceImpI implements MenoService {
    @Autowired
    private MenoMapper menoMapper;

    @Override
    public List<MenoBean> getMessages(){
        return menoMapper.selectAll();
    }

    public List<MenoBean> getMessagesBystatus0(){
        return menoMapper.selectBystatus0();
    }
    public List<MenoBean> getMessagesBystatus1(){
        return menoMapper.selectBystatus1();
    }
    public List<MenoBean> getMessagesBystatus2(){
        return menoMapper.selectBystatus2();
    }
    public int saveMessages(MenoBean menoBean) { return menoMapper.save(menoBean); }
    public int updateMessages(MenoBean menoBean) { return menoMapper.update(menoBean); }
    public MenoBean getMessagesById(int meno_id) {
        return menoMapper.getMeno(meno_id);
    }
    public int delete(int meno_id) {
        return menoMapper.delete(meno_id);
    }
}